//
//  PlayerDetailsViewController.h
//  Ratings
//
//  Created by steven.zhan on 14-9-16.
//  Copyright (c) 2014年 hpxbzz. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Player.h"
#import "GamePickerViewController.h"

@class PlayerDetailsViewController;

@protocol PlayerDetailsViewControllerDelegate <NSObject>

- (void)playerDetailsViewControllerDidCancel:(PlayerDetailsViewController*)controller;
- (void)playerDetailsViewControllerDidSave:(PlayerDetailsViewController*)controller didAddPlayer:(Player*)player;
- (void)playerDetailsViewControllerDidEdit:(PlayerDetailsViewController*)controller didEditPlayer:(Player*)player;

@end

@interface PlayerDetailsViewController : UITableViewController<GamePickerViewControllerDelegate>

@property (nonatomic, weak) id<PlayerDetailsViewControllerDelegate> delegate;
@property (weak, nonatomic) IBOutlet UITextField *nameTextField;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;
@property (nonatomic, strong)Player *playerToEdit;

- (IBAction)cancel:(id)sender;
- (IBAction)done:(id)sender;

@end
